package com.burstly.lib.currency.request;

import com.burstly.lib.currency.AccountInfo;
import com.burstly.lib.currency.UserAccount;
import com.burstly.lib.currency.UserAccountStorage;
import com.burstly.lib.network.request.DefaultRequestCallback;
import java.util.concurrent.atomic.AtomicLong;

class LinkUserCallback<T> extends DefaultRequestCallback<T>
{
  private static final int INIT_DELAY_VALUE = 10;
  final AtomicLong mDelayTime = new AtomicLong(10L);
  private final AccountInfo mNewAccountInfo;
  private final UserAccount mOldAccount;

  LinkUserCallback(UserAccount paramUserAccount, AccountInfo paramAccountInfo)
  {
    this.mOldAccount = paramUserAccount;
    this.mNewAccountInfo = paramAccountInfo;
  }

  public void onSuccessInBackground(T paramT)
  {
    UserAccountStorage localUserAccountStorage = UserAccountStorage.getInstance();
    localUserAccountStorage.clearStorage(this.mOldAccount.getCacheFilename());
    this.mOldAccount.setUserId(this.mNewAccountInfo.getUserId());
    this.mOldAccount.setPubId(this.mNewAccountInfo.getPubId());
    this.mOldAccount.setCacheFilename(null);
    localUserAccountStorage.saveAccount(this.mOldAccount);
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.burstly.lib.currency.request.LinkUserCallback
 * JD-Core Version:    0.6.2
 */